<% Dim optArray(20) showPhoto = CBool(largeimage) msgNoAd = "
" & strText_AdisnotFound & "
" & msgBack If Sess_Array(48) = Session.SessionID Or CBool(Sess_Array(35)) then moderator = True If not moderator And cfg_view And Len(CStr(Sess_Array(29))) < 2 then UpdateSessions False Response.Redirect "info.asp?id=4" End If If request.querystring.count = 1 then adID = CStr(request.querystring.item(1)) If NOT isNumeric(adID) Or Len(adID) = 0 Then UpdateSessions False: Response.End Set rs = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT " & tablPfx & "Ads.*, " & tablPfx & "Cat.*, " & tablPfx & "Scat.scatName FROM " & tablPfx & "Ads, " & tablPfx & "Cat, " & tablPfx & "Scat" strSQL = strSQL & " WHERE (adID = '" & adID & "' AND " & tablPfx & "Cat.catID = " & tablPfx & "Ads.catID AND " & tablPfx & "Scat.sCatID = " & tablPfx & "Ads.scatID);" rs.CursorType = 3 rs.Open strSQL, objConn If Not rs.EOF then userID = rs(4) status = CLng(rs(15)) If CStr(userID) = CStr(Sess_Array(29)) then adOwner = True If Not moderator And Not adOwner then If status = 0 Or status = 2 then showAd = False Else: showAd = True End If Else: showAd = True End If End If Else Response.Write msgNoAd UpdateSessions False Response.End End If If not showAd then rs.close Response.Write msgNoAd Else Select Case status Case 0: adStatus = strText_NotActive Case 2: adStatus = strText_Expired Case 1: adStatus = strText_Active Case 3: adStatus = strText_Disabled End Select catID = rs(2) scatID = rs(3) cat3rdID = CLng(rs("cat3rdID")) If cat3rdID > 0 then set rs3 = objConn.Execute("SELECT scatName FROM " & tablPfx & "Scat WHERE sCatID = " & cat3rdID & ";") If Not rs3.EOF then cat3rdName = rs3(0) Else: cat3rdID = 0 End If rs3.close End If catName = rs("catName") For co = 1 to 20 optArray(co) = rs("catOpt" & co) Next subcatName = rs("scatName") adDescr = rs(14) adDescr = formatBody(adDescr) epstatus = CBool(rs("epick")) %> <% datePosted = FormatDateTime(CDate(rs(5)), 1) dateExpire = FormatDateTime(CDate(rs(6)), 1) nick = rs(7) adcount = CLng(rs(17)) + 1 If Sess_Array(48) = Session.SessionID then nick = "" & nick & "" userWeb = rs(11) If userWeb = Empty then noSite = True Else userWeb = "User Web Site" End If userWebImage = rs(13) city = rs(8) If city = Empty then noCity = True adPhone = rs(10) If adPhone = Empty then noPhone = True sbg = rs(9) hotlist = Cbool(rs(18)) If hotlist then hot_img = "" & strText_AltHotAd & " " If epstatus then epick_img = " " adSubject = hot_img & epick_img & sbg adImgTempArray = rs(12) If not adImgTempArray = Empty then img = True adImgArray = Split(adImgTempArray, sf) imgArrayDim = UBound(adImgArray) - 1 strImgDisplay = "
" & vbCrLf strImgDisplay = strImgDisplay & "" & vbCrLf For d = 0 to imgArrayDim If d = 5 then strImgDisplay = strImgDisplay & "" If d = 0 then initIcon = "url('img/ps1.gif')" Else: initIcon = "url('img/p" & d+1 & ".gif')" End If If showPhoto then bf = "document.getElementById('ib" & d+1 & "').style.display = 'block';" strImgDisplay = strImgDisplay & "" & vbCrLf Next If d < 4 then For t = 0 to 4-d strImgDisplay = strImgDisplay & "" & vbCrLf Next End If strImgDisplay = strImgDisplay & "
" & vbCrLf For d = 0 to imgArrayDim adImg = Split(adImgArray(d), "|")(0) adSize = Split(adImgArray(d), "|")(1) w = CLng(Split(adSize, "x")(0)) h = CLng(Split(adSize, "x")(1)) wa = w ha = h If w > 95 then koef = w / h w = 95 h = Round(95 / koef) End If If h > 95 then koef = h / w h = 95 w = Round(95 / koef) End If If d > 0 then initImg = " style=""display: none;""" Else initImg = Empty firstImage = "" End If adImg_tb = gettf(adImg) If Not objFile.FileExists(uploadPATH & adImg_tb) then adImg_tb = adImg strImgDisplay = strImgDisplay & "" strImgDisplay = strImgDisplay & "" & vbCrLf If showPhoto then strLargeImgDisplay = strLargeImgDisplay & "" & vbCrLf Next strImgDisplay = strImgDisplay & "
 
 
 
  
" & vbCrLf If imgArrayDim > 0 then '*** Select Which Slide Show to start with ********** sl_type = "slide" ' Normal 'sl_type = "trans" ' Translucent 'sl_type = "belt" ' Conveyor Belt 'sl_type = "down" ' Down up 'sl_type = "manual" ' Manual '*** Select Which Slide Show to start with ********** strImgDisplay = strImgDisplay & "
" & strText_SlideShow & "
" End If strJava = "" Response.Write strJava End If Response.Write browseAds(adID, catID, scatID, cat3rdID, 1) Call Build_List_Top("center", "99%", "xl_content") %>
 <%= adSubject %> <% If moderator then If hotlist then Response.Write " Remove From HotList" Else Response.Write " Add to HotList" End If End If %>
  <% If Not Sess_Array(29) = 0 then %> <%= strText_AddtoFavorites %> | <% End If If Sess_Array(48) = Session.SessionID then If epstatus then Response.Write "Remove from Editor's Pick | " Else Response.Write "Add to Editor's Pick | " End If End If %> <%= strText_EmailtoaFriend %> | <%= strText_PrintFriendly %>   <% If not moderator And cfg_reply And Len(CStr(Sess_Array(29))) < 2 then Reply_Link = "info.asp?id=5" Else: Reply_Link = "reply.asp?id=" & adID & "&name=" & Server.URLEncode(sbg) End If %>
 <%= strText_AdPosted %>: <%= datePosted %>
 <%= strText_AdExpire %>:  <%= dateExpire %>
 <%= strText_UserInformation %>:
<% If moderator then %> <% End If For uo = 0 to 6 If Not uOpt(uo) = Empty Then nextUserOpt = rs(uo+20) If Not nextUserOpt = Empty Then %> <% End If End If Next If not noPhone Then %> <% End If If not noCity Then %> <% End If If not noSite Then %> <% End If %>
<%= strText_Postedby %>: <%= nick %>
<%= strText_IPAddress %>: <%= rs(16) %>
<%= uOpt(uo) %>: <%= nextUserOpt %>
<%= strText_Phone %>: <%= adPhone %>
<%= strText_UserLocation %>: <%= city %>
<%= strText_UserWebSite %>: <%= userWeb %>
<%= strText_AllUserAds %>: <%= strText_AllAds %> <%= strText_by %> <%= nick %>
 <%= strText_AdInformation %>:
<% For I = 1 to 20 If not optArray(I) = Empty AND not IsNull(optArray(I)) then nextAdOpt = rs("opt" & I) If not nextAdOpt = Empty AND not IsNull(nextAdOpt) And instr(nextAdOpt, sg) = 0 then %> <% End If End If Next %>
<%= optArray(I) %>:  <%= nextAdOpt %>

<% If img then Response.Write strImgDisplay Else Response.Write "
" End If If not userWebImage = Empty then Response.Write "Online Image" End If %>
 <%= strText_AdDescription %>:
<%= strText_ReportInappropriateContent %> 
<%= strText_Viewed %>: <%= adcount %> <%= strText_times %> 
 <%= strText_Textsize %>:  a  a  a  a 
<%= adDescr %>
 <%= strText_Status %>: <%= adStatus %> <% If moderator and status = 0 then Response.Write "  Activate" If moderator or adOwner then If status = 2 then Response.Write "  " & strText_Repost & "" Else If Not status = 3 then Response.Write "  " & strText_Edit & "" End If If status = 3 then Response.Write "  " & strText_Enable & "" Else If status = 1 then Response.Write "  " & strText_Disable & "" End If End If If moderator or adOwner then Response.Write "  " & strText_Delete & "" If Not status = 2 And Not status = 3 then Response.Write "  " & strText_Images & "" End If If moderator and not status = 2 then Response.Write "

 Duration:  " Response.Write " " Response.Write "" End If If moderator then Response.Write "  Move" End If %>
<% Call Build_List_Bottom() %> <% If showPhoto and Len(strLargeImgDisplay) > 5 then Response.Write "
" & strLargeImgDisplay %>

<% rs.close objConn.Execute("UPDATE " & tablPfx & "Ads SET adcounter = " & adcount & " WHERE adID = '" & adID & "';") End If Function browseAds(adID, catID, scatID, cat3rdID, target) Select Case target Case 0: strSQL = "SELECT adID FROM " & tablPfx & "Ads WHERE status = 1 ORDER BY hotlist DESC, pdate DESC;" Case 1: strSQL = "SELECT adID FROM " & tablPfx & "Ads WHERE (status = 1 AND catID = " & CLng(catID) & ") ORDER BY hotlist DESC, pdate DESC;" Case 2: strSQL = "SELECT adID FROM " & tablPfx & "Ads WHERE (status = 1 AND scatID = " & CLng(scatID) & ") ORDER BY hotlist DESC, pdate DESC;" Case 3: strSQL = "SELECT adID FROM " & tablPfx & "Ads WHERE (status = 1 AND cat3rdID = " & CLng(cat3rdID) & ") ORDER BY hotlist DESC, pdate DESC;" End Select set rspage = objConn.Execute(strSQL) If not rspage.EOF then rsdata = rspage.getrows rspage.close totalAds = UBound(rsdata,2) For F = 0 To totalAds current_adID = rsdata(0,F) If CStr(adID) = CStr(current_adID) then If F = 0 then PrevStr = "" Else PrevStr = "" End If If F = totalAds then NextStr = "" Else NextStr = "" End If Exit For End If Next browseAds = "
" & PrevStr & "  " & NextStr & "
" Else: rspage.close End If End Function %>